import java.util.function.Consumer;
import java.util.function.Function;

/**
 * @Author: admin
 * @Description:
 * @Date: 2019/3/6 17:11
 */

public class MyFunction {
    public static void main(String[] args) {
        Function<Integer,Integer> a=i->i+1;
        Function<Integer,Integer> b=i->i*i;

        Integer i=3;
        System.out.println( a.apply(b.apply(i)));
        a.compose(b).apply(i);
        System.out.println( b.apply(a.apply(i)));
        System.out.println( a.compose(b).apply(i));
        System.out.println( a.andThen(b).apply(i));
        System.out.println(i);

        Consumer<Integer> consumer= System.out::println;
        consumer.accept(12);

        System.out.println("hello");

    }




}
